
#include <gtest/gtest.h>

#include "nane/core/types.h"
#include "nane/core/typetraits.h"
#include "nane/core/staticassert.h"

TEST( NaneTest, TypesCheck )
{
    STATIC_ASSERT( 1 == sizeof(nane::int8) );
    STATIC_ASSERT( 1 == sizeof(nane::uint8) );
    STATIC_ASSERT( 2 == sizeof(nane::int16) );
    STATIC_ASSERT( 2 == sizeof(nane::uint16) );
    STATIC_ASSERT( 4 == sizeof(nane::int32) );
    STATIC_ASSERT( 4 == sizeof(nane::uint32) );
    STATIC_ASSERT( 8 == sizeof(nane::int64) );
    STATIC_ASSERT( 8 == sizeof(nane::uint64) );
    STATIC_ASSERT( 1 == sizeof(nane::byte) );
}

TEST( NaneTest, TypeTraitsCheck )
{
    EXPECT_FALSE( nane::IsPointerT<int>::value );
    EXPECT_TRUE( nane::IsPointerT<int*>::value );
    EXPECT_TRUE( nane::IsVoidT<void>::value );
    EXPECT_FALSE( nane::IsVoidT<int>::value );
}

